<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style> 
    /*2.类比于鸿蒙中的样式属性*/
        button{
            background-color: chartreuse;
            width: 200px;
            height: 200px;
            color: blueviolet;
            font-size: 50px;
        }
    </style>
    <title>Document</title>
</head>
<body>
    <!--1.类比于鸿蒙中的 Button()-->>
    <button>我是一个按钮</button>
    

    <script>  
        document.querySelector('button').onclick = function () {
            console.log('么么哒')
        }
    </script>
</body>
</html>